#/usr/bin/python
import os,sys

def ip_gateway():
    response = os.popen("route | grep default").read()
    response = response.split(" ")
    gateway = response[9]
    return gateway

def mac_address(ip):
    response = os.popen("arp | grep "+ip).read()
    response = response.split(" ")
    mac = response[15]
    return mac
    
if(__name__ == "__main__"):
    print ip_gateway()
    print mac_address(ip_gateway())